package com.tyk.bookstore.front.product.repository;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tyk.bookstore.front.product.model.dto.StatisticCardDto;
import com.tyk.bookstore.front.product.model.entity.BookStatisticDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BookStatisticRepository extends BaseMapper<BookStatisticDo> {
    Long countTotal();

    List<BookStatisticDo> selectSortPage(@Param("orderByCondition") String orderByCondition, @Param("offset") Long offset, @Param("limit") Long limit);

    List<StatisticCardDto> selectBookIdListByWrapper(@Param("ew") LambdaQueryWrapper<BookStatisticDo> ew);
}
